const auto parentFolderPath = fileInfo.dir().absolutePath();
const auto parentPermissionsHandler = FileSystem::FilePermissionsRestore{parentFolderPath, FileSystem::FolderPermissions::ReadWrite};
removeOk = FileSystem::remove(di.filePath(), &removeError);
+ qCInfo(lcFileSystem()) << "delete" << di.filePath();
if (removeOk) {
if (onDeleted)
onDeleted(di.filePath(), false);
const auto parentPermissionsHandler = FileSystem::FilePermissionsRestore{parentFolderPath, FileSystem::FolderPermissions::ReadWrite};
FileSystem::setFolderPermissions(path, FileSystem::FolderPermissions::ReadWrite);
allRemoved = QDir().rmdir(path);
+ qCInfo(lcFileSystem()) << "delete" << path;
if (allRemoved) {
if (onDeleted)
onDeleted(path, true);
bool FileSystem::isFolderReadOnly(const std::filesystem::path &path) noexcept
{
#ifdef Q_OS_WIN
- qCInfo(lcFileSystem()) << "is it read-only folder:" << path.wstring().c_str();
+ qCInfo(lcFileSystem()) << "is it read-only folder:" << QString::fromStdWString(path.wstring());
SECURITY_INFORMATION info = DACL_SECURITY_INFORMATION;
std::unique_ptr<char[]> securityDescriptor;
const auto currentAceHeader = reinterpret_cast<PACE_HEADER>(currentAce);
if ((ACCESS_DENIED_ACE_TYPE == (currentAceHeader->AceType & ACCESS_DENIED_ACE_TYPE))) {
- qCInfo(lcFileSystem()) << "detected access denied ACL: assuming read-only folder:" << path.wstring().c_str();
+ qCInfo(lcFileSystem()) << "detected access denied ACL: assuming read-only folder:" << QString::fromStdWString(path.wstring());
return true;
}
}